package com.tansun.easycare.rule.common.service;

import java.util.List;
import java.util.Map;

import com.tansun.easycare.rule.common.DataParamTreeVO;
import com.tansun.easycare.rule.common.DataSetTreeVo;
import com.tansun.easycare.rule.common.model.Bom;
import com.tansun.easycare.rule.common.model.BomField;
import com.tansun.easycare.rule.common.model.Domain;
import com.tansun.easycare.rule.common.web.model.ProjectInfo;
import com.tansun.easycare.rule.datamodel.entity.RuleDataDomain;
import com.tansun.easycare.rule.datamodel.entity.RuleDataEntity;
import com.tansun.easycare.rule.datamodel.entity.RuleDataset;
import com.tansun.easycare.rule.datamodel.entity.RuleEnum;
import com.tansun.easycare.rule.rulemange.entity.RuleManage;
import com.tansun.rule.utils.MClass;

public interface DataBomService {
	
    Map<String, Bom> findBomMapByProjectCode(String projectCode,String rankrelationId);
    
    /**
     * RuleDataDomain 没有projectCode
     * @return
     */
    Map<String, List<RuleDataDomain>> findDomainMap();

    Map<String, Domain> findDomainByProjectCode(String projectCode);
    
    List<RuleEnum> findRuleEnumByProjectCode(String projectCode);
    
    List<RuleEnum> findRuleEnumTypeByProjectCode(String projectCode);

    /**
     * 通过规则项目查找数据模型信息（用于页面构建ztree）
     */
    List<DataSetTreeVo> findBomListByProjCode(String projectCode);
    List<DataSetTreeVo> findBomListByProjCode(String projectCode,String rankRelationId);
    /**
     * 递归目录查找数据模型信息
     * @param projectCode
     * @param rankRelationId
     * @return
     */
    public List<DataSetTreeVo> findBomListByProjCodeRecursion(String projectCode,String rankRelationId);

    /**
     * 查找项目数据模型
     */
    Map<String, RuleDataset> findRuleDataset(String projectCode);

    /**
     * 查询数据域列表
     */
    List<RuleDataDomain> findDataDomains(String domain, String projectCode);

    /**
     * 查找数据模型
     */
    Map<String, MClass> findMapClass(String projectCode);

    Map<String, BomField> findBomField(String projectCode);


	List<RuleDataEntity> findRuleDataEntityListByRuleManage(RuleManage ruleManage);
	
    /**
     * 此方法仅用于全部数据模型导出
     */
	public Map<String, MClass> findMapClass(String projectCode,String  buildin, String rankRelationId);
	
    /**
     * 此方法仅用于根据数据模型id的数据模型导出
     */
	public Map<String, MClass> findMapClassByDataModelId(String projectCode,String  buildin, String datamodelid, String rankRelationId);
	
	public  List<RuleDataDomain> findDataDomains(String domain);
	
    public  List<DataParamTreeVO>  findDataParam(String projectCode,String rankRelationId) throws Exception;

	List<DataParamTreeVO> findDatasetList(ProjectInfo  projectInfo) throws Exception;

	List<DataParamTreeVO> findDataParam(String projectCode, String rankRelationId, String selectSets) throws Exception;

}
